<?php
    $block_title =     $this->vote_info->thread_name.($this->vote_info->phase_name!=""?" - ".$this->vote_info->phase_name:"");
?>
        <div class="top-content-page">
            <div class="cde_1 png">
               <table cellspacing="0" cellpadding="0" width="100%">
                  <tbody><tr>
                     <td width="50%"><div class="de_0_1 png">
                           <div class="de_0_3 png">
                              <div class="de_0_4"></div>
                           </div>
                        </div></td>
                     <td width="50%"><div class="de_0_2 png">
                           <div class="de_0_3 png">
                              <div class="de_0_4"></div>
                           </div>
                        </div></td>
                  </tr>
               </tbody></table>
            </div>
            <div class="cde_2">
               <div id="wrapper">
                <div id="content-subpage">
                
                    <!--Info:-->
                    <div class="event-area" id="info">
                        <div style="background-image:none;" class="event-header-long">
                            <span class="value"><img src="<?php print $this->spath; ?>/images/binhchonthisinh.png"></span>                    
                        </div>
                        <div class="hde png">
                           <table cellspacing="0" cellpadding="0" width="100%">
                              <tbody><tr>
                                 <td width="50%"><div class="hde_1">
                                       <div class="de_0_1"></div>
                                    </div></td>
                                 <td width="50%"><div class="hde_2">
                                       <div class="de_0_1"></div>
                                    </div></td>
                              </tr>
                           </tbody></table>
                        </div>
                        <div style="padding:0px 20px 0px 30px;" class="event-content-long">
                            <div class="photo_poll">
                                <ul class="member_list">
                                    <!--Tieu de:-->
                                    <li class="header">
                                        <div class="float-left image">&nbsp;Hình ảnh</div>
                                        <div class="float-left name">Thông tin</div>
                                        <div class="float-left view">Xem</div>
                                        <div class="float-left sms">SMS</div>
                                        <div class="float-left web">Web</div>
                                        <div class="float-left total">Tổng</div>
                                        <div class="clear"></div>
                                    </li>
                                    
                                    <!--Danh sach thi sinh:-->
                                    <?php
                                if(is_array($this->voted_list) && count($this->voted_list)>0){
                                $i = 0;
                                foreach($this->voted_list as $node){
                        
                                    //$img="http://img.tamtay.vn" . $node->thumbnail;
                                    $img = (isset($node->img_server)?'http://img'.($node->img_server != 1?$node->img_server:'').'.tamtay.vn/':EVENT_IMG_SERVER2).$node->thumbnail;
                                    $star = 0;
                                    if(isset($node->rate_value))
                                        $star=ceil($node->rate_value/20);
                                    
                                    //$web_vote=round($o->rate_value*$o->vote_web_count, 0);
                                    $web_vote = $node->vote_web_count;
                                    if ($this->total_vote_web==0){
                                        $web_percent=0;
                                    }
                                    else{
                                        $web_percent=round($web_vote/$this->total_vote_web, 4)*100;
                                    }
                                    if ($this->total_vote_sms==0){
                                        $sms_percent=0;
                                    }
                                    else{
                                        $sms_percent=round($node->vote_sms_count/$this->total_vote_sms, 4)*100;
                                    }
                                    $t=$web_percent + $sms_percent;
                                    $i++;
                                ?>
                                    <li class="item_member">
                                        <div class="float-left image">
                                            <span class="order"><?=$i?></span>
                                            <a href="http://photo.tamtay.vn/photo/view/<?php echo $node->aid;?>" title="<?php echo $node->album_name;?>"><img src="<?php print $this->spath; ?>/images/spacer.gif" style="background-image: url('<?=$img;?>'); background-position: center; background-repeat: no-repeat;" /></a>
                                      </div>
                                        <div class="float-left name">
                                            <p><a href="http://photo.tamtay.vn/photo/view/<?php echo $node->aid;?>" target="_blank"><?php echo $node->album_name;?></a></p>
                                            <p><img src="http://img.tamtay.vn/images/stars<?php echo $star; ?>.gif" /></p>
                                            <p class="soantin">Soạn: <span class="maso"><?php echo $this->vote_info->sms_command_code;?>&nbsp;<?php echo $node->sbd; ?></span> gửi <span class="gui"><?php echo $this->vote_info->sms_destination1;?></span> (<em><span style="color:red;"><?php echo $this->vote_info->sms_basic_num1;?></span> phiếu</em>)
                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hoặc gửi <span class="gui"><?php echo $this->vote_info->sms_destination2;?></span> (<em><span style="color:red;"><?php echo $this->vote_info->sms_basic_num2;?></span> phiếu</em>).
                                            </p>
                                        </div>                        
                                        <div class="float-left view">
                                            <?php echo $node->view_count; ?>
                                        </div>
                                        <div class="float-left sms">
                                            <?php echo $sms_percent;?>%
                                        </div>
                                        <div class="float-left web">
                                            <?php echo $web_percent;?>%
                                        </div>
                                        <div class="float-left total">
                                            <?php echo $t;?>%
                                        </div>
                                        <div class="clear"></div>
                                    </li>
                                    <?php
                                    }// End for loop
                                }// End if
                            ?>

                                </ul>
                            </div>                            
                        </div>
                    </div>
                    <!--End info-->
                    
                    <!--News:-->
                  <!--End news-->
                  <!--Photo:-->
                  <!--End photo-->
                  <!--Video:-->
                  <!--End Video-->
              </div>
            </div>
               <!--right Bar:-->
               <div id="rightbar">
                  <!--Nut binh chon-->
                  <div class="event-area btn-bc"> <a title="Bình chọn album" href="<?php echo "http://www.tamtay.vn/event/".$this->event->short_cut."/votedlist";?>"><img src="<?php print $this->spath; ?>/images/spacer.gif" alt="Bình chọn"></a> </div>
                  <!--Het nut binh chon-->
                  <!--Slide:-->
                  <div style="-moz-border-radius: 5px 5px 5px 5px;border-radius: 5px 5px 5px 5px;-webkit-border-radius: 5px 5px 5px 5px; background-color: #F21C72; color: #FFFFFF;margin-bottom: 10px;margin-top:20px; text-align:center;" class="event-area" id="slide">
                     <!--<div class="event-header-short"> <span class="value">Slide</span> </div>-->
                     <div class="event-content-short">
                        <div style="text-align:center">
                           <script type="text/javascript">
                                new fadeshow(fadeimages2, 245, 300, 0, 3000, 0, "R");
                            </script>
                        </div>
                        <br>
                        Hãy bình chọn cho các thí sinh mình yêu thích nhất!<br>
                        Để đánh giá và bình chọn cho các thí sinh trên <a style="color:#FFE57F;" target="_blank" href="http://www.tamtay.vn">www.tamtay.vn</a> bạn cần phải <a style="color:#FFE57F;" target="_blank" href="http://ids.tamtay.vn/user/register">đăng ký</a> tài khoản. </div>
                     <div class="viewmore"></div>
                  </div>
                  <!--Het slide-->
                  <!--Top 10:-->
                  <?php echo $this->top_block?>
                  <!--Het top 10-->
                  <div class="event-area"><a target="_blank" href="#"></a></div>
                  <!--Gop y :-->
                  <div id="wall" class="event-area">
                     <div class="event-header-short"> <span class="value"><img src="<?php print $this->spath; ?>/images/comment.png" /></span> </div>
                     <div class="hde png">
                        <table width="100%" cellpadding="0" cellspacing="0">
                           <tr>
                              <td width="50%"><div class="hde_1">
                                    <div class="de_0_1"></div>
                                 </div></td>
                              <td width="50%"><div class="hde_2">
                                    <div class="de_0_1"></div>
                                 </div></td>
                           </tr>
                        </table>
                     </div>
                     <div class="event-content-short"  id="wall_block">
                        <?php echo $this->comment_block?>
                     </div>
                  </div>
                  <!--Het gop y-->
               </div>                
               <div class="clear"></div>
            </div>
            <div class="cde_3 png">
               <table cellspacing="0" cellpadding="0" width="100%">
                  <tbody><tr>
                     <td width="50%"><div class="de_0_1 png">
                           <div class="de_0_3 png">
                              <div class="de_0_4"></div>
                           </div>
                        </div></td>
                     <td width="50%"><div class="de_0_2 png">
                           <div class="de_0_3 png">
                              <div class="de_0_4"></div>
                           </div>
                        </div></td>
                  </tr>
               </tbody></table>
            </div>
         </div>